﻿using System;
using System.Collections.Generic;
using System.Text;
using OVS.CoreDomain.Business;
using OVS.Data;
using OVS.CoreDomain;
using OVS.CoreDomain.Data;

namespace OVS.Business
{
    public class BusinessElection : IBusinessElection
    {

         public IDalElection  _dalElection;
        

        public BusinessElection(IDalElection dalElection)
        {
            _dalElection = dalElection;
        }

        public BusinessElection()
        {
            _dalElection = new DalElection();
        }

        
        public bool AddElection(IElection election)
        {
            return _dalElection.AddElection(election);
        }



        #region IBusinessElection Members


        public IList<IElection> GetElections()
        {
            return _dalElection.GetElections();
        }

        public IElection GetElection(int electionId)
        {
            return _dalElection.GetElection(electionId);
        }

        #endregion

        #region IBusinessElection Members


        public bool UpdateElection(IElection election)
        {
            return _dalElection.UpdateElection(election);
        }

        #endregion
    }
}
